package com.yanqu.road.server.logic.player;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class LoginIpManager {
    /**
     * 用户登录时，web通过 webService 将ip存在这
     */
    private static Map<Long, String> userIpMap = new ConcurrentHashMap<>();

    public static void recordUserIp(long userId, String ip) {
        userIpMap.put(userId, ip);
    }

    public static String getUserIp(long userId) {
       return userIpMap.get(userId);
    }
}
